<%@ page import="com.informet.ipd.modelo.dao.ProgEstrDao" %>
<%@ page import="com.informet.ipd.modelo.vo.UbigeoVO" %>
<%@ page import="com.informet.ipd.struts.form.ProgEstrForm" %>
<%@ page import="java.util.*" %>
<%@ page import="javax.swing.JOptionPane"%>

<%@ taglib uri="/tags/c" prefix="c"%>

<%

            StringBuffer cadenaSalida = new StringBuffer();
            List lista = null;


            ProgEstrDao supportFacade = new ProgEstrDao();
            ProgEstrForm form = new ProgEstrForm();

            try {


                String id = request.getParameter("id");

                // JOptionPane.showMessageDialog(null, "tipo : "+ tipo);

                UbigeoVO vo;
                lista = supportFacade.getComboUgel(id);
                form.setListProvincia(lista);

                cadenaSalida.append("<select  name='ugel' id='ugel' >");
                cadenaSalida.append(" <option value='-1'>[--Seleccionar Ugel--]</option>");

                Iterator it = lista.iterator();
                while (it.hasNext()) {
                    vo = (UbigeoVO) it.next();


                    cadenaSalida.append("<option value='"+vo.getNUM_CODUGEL_PK()+"'>"+vo.getTX_NOMBUGEL()+"</option>");



                }
                 cadenaSalida.append("</select>");
            } catch (Exception e) {
                   cadenaSalida.append("error : "+e.toString());
            }
            out.print(cadenaSalida);
%>